<?php
/**
 * Created by PhpStorm.
 * User: zcq
 * Date: 2018/11/6
 * Time: 16:43
 */

namespace app\api\controller;



class Git extends Base
{
    public function pull()
    {
        $param = input();
//        trace('git:'.json_encode($param),'error');
        $pwd = input('password');
        if($pwd == 'wechat'){
            exec('cd /var/www/wechat_yingx',$a);
            exec('sudo git pull origin master',$b);
            trace('git:'.json_encode($a),'error');
            trace('git:'.json_encode($b),'error');
//            trace('git:123','error');

        }
    }
}